<%@page import="org.apache.commons.validator.GenericValidator"%>
<%@page import="org.prs.model.User"%>
<%@page contentType="text/html"  language="java" %>
<%
            User loggedInUser = (User) session.getAttribute("loggedinuser");
            if (loggedInUser == null) {
                response.sendRedirect("index.jsp");
            }
//

            String photoCreationMessage = (String) session.getAttribute("photocreationmsg");
            session.setAttribute("photocreationmsg", null);
%>
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta name="keywords" content="" />
        <meta name="description" content="" />
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <title>Patnership Record System</title>
        <link href="style.css" rel="stylesheet" type="text/css" media="screen" />
        <script type="text/javascript" src="js/menu.js">
        </script>
    </head>
    <body>
        <div id="wrapper">
            <div id="header">
                <div id="logo">
                    <h1><a href="#">Patnership Record System </a></h1>
                </div>
                <div id="menu">
                    <jsp:include page="includes/header.jsp"></jsp:include>
                </div>
            </div>
            <!-- end #header -->
            <div id="page">
                <div id="page-bgtop">
                    <div id="page-bgbtm">
                        <div id="content">
                            <form action="newphoto" method="post" class="foorm" enctype="multipart/form-data">
                                <%
                                            if (!GenericValidator.isBlankOrNull(photoCreationMessage)) {
                                                out.println(photoCreationMessage);
                                            }
                                %>
                                <table width="100%">
                                    <tr>
                                        <td width="50%"><label>Photo</label></td>
                                        <td>
                                            <input type="file" name="photo" value="Browse"/>
                                        </td>

                                    </tr>
                                    <tr><td colspan="2" width="50%"><input type="submit" value="Upload"/></td></tr>
                                </table>

                            </form>
                            <a href="listChildren.jsp">Back to Children List</a>
                        </div>
                        <!-- end #content -->
                        <div id="sidebar">


                            <!-- Navigation Start-->
                            <div class="navigation">
                                <div class="navhead">Welcome </div>
                                <%
                                            if (loggedInUser != null) {
                                                out.println("<div id='welcomemsg'>Welcome " + loggedInUser.getFirstName() + " " + loggedInUser.getLastName() + "</div>");
                                            }

                                %>
                                <form action="loginlogout" method="post" class="link">
                                    <input type="hidden" value="logout" name="action" />
                                    <input type="submit" value="Log Out"/>
                                </form>

                            </div>
                        </div>
                        <!-- end #sidebar -->
                        <div style="clear: both;">&nbsp;</div>
                    </div>
                </div>
            </div>
            <!-- end #page -->
        </div>
        <div id="footer">
            <p>Copyright (c) 2011 prs.org. All rights reserved. Design by <a href="http://rwebs.javassl.com/">Java Servlet Systems Limited</a>.</p>
        </div>
        <!-- end #footer -->
    </body>
</html>
